﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using nRoute.ApplicationServices;
using System.Windows;
using System.Globalization;
using System.Windows.Markup;
using nRoute.Components.Mapping;
using nRoute.Samples.Netflix.Data;

namespace nRoute.Samples.Netflix
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : nRoute.ApplicationServices.Application
    {
        static App()
        {
            // see http://stackoverflow.com/questions/2689771/wpf-xaml-stringformat-culture-workaround-broken-in-c-4-0
            FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement),
                new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
        }

        protected override void OnStartup(System.Windows.StartupEventArgs e)
        {
            base.OnStartup(e);
            AssemblyMapper.MapAssembly(typeof(NetflixDataContext).Assembly);
        }
    }
}
